﻿@model XPressify.Models.CreateEventModel
@using XPressify.Data.Helpers

@{
    ViewBag.Title = "Create event";
}

<script type="text/javascript">

    $(function () {
        $(".dateTimePicker").datetimepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: 'dd-mm-yy',
            timeFormat: 'hh:mm',
            minDate: 0
        });
    });
</script>
   
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend style="font-size:x-large;color:#222">Event</legend>
         
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
        </div>

        <div class="editor-field">
            @Html.LabelFor(model => model.StartDate) : <br />
            @Html.EditorFor(model => model.StartDate)
            @Html.ValidationMessageFor(model => model.StartDate)
        </div>
         
        <div class="editor-field">
            @Html.LabelFor(model => model.EndDate) : <br />
            @Html.EditorFor(model => model.EndDate)
            @Html.ValidationMessageFor(model => model.EndDate)
        </div>
            
        
        <div class="editor-field">
            @Html.LabelFor(model => model.Location) : <br />
            @Html.TextBoxFor(model => model.Location)
            @Html.ValidationMessageFor(model => model.Location)
        </div>
          
        <div class="editor-field" style="height:100px">
            @Html.LabelFor(model => model.Description) : <br />
            @Html.TextAreaFor(model => model.Description, 4, 21, new { style = "resize: none;" })
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-field">
            @Html.LabelFor(model => model.MembersCanPost) : <br />
            @Html.DropDownListFor(model => model.MembersCanPost, new List<SelectListItem> { new SelectListItem { Text = "True", Value = Boolean.TrueString }, new SelectListItem { Text = "False", Value = Boolean.FalseString } })
            @Html.ValidationMessageFor(model => model.MembersCanPost)
        </div> 

        <div class="editor-field">
            @Html.LabelFor(model => model.Privacy) : <br />
            @Html.DropDownListFor(model => model.Privacy, new List<SelectListItem> { new SelectListItem { Text = "Public", Value = SubjectPrivacy.Public.ToString() }, new SelectListItem { Text = "Private", Value = SubjectPrivacy.Private.ToString() } })
            @Html.ValidationMessageFor(model => model.Privacy)
        </div>
    </fieldset>
}

